package com.example.demo.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author chen huilong
 * @since 2022-10-04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CmsException extends RuntimeException {

    private Integer code;
    private String msg;

    public CmsException(ReplyInfo replyInfo) {
        super(replyInfo.getMsg());
        this.code = replyInfo.getCode();
        this.msg = replyInfo.getMsg();
    }
}
